package logic;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;




public class cli {

	/**
	 * @param args
	 * @throws IOException 
	 */
	public static void main(String[] args) throws IOException {
		System.out.println("Numero de Linhas/Coulunas:");
		 BufferedReader br = 
                 new BufferedReader(new InputStreamReader(System.in));
		
		int num=Integer.parseInt(br.readLine());
		Creator novoMapa=new Creator(num);
		System.out.println("Numero de flow's:");
		int n=Integer.parseInt(br.readLine());
		for(int i=0;i<n;i++)
		{
			System.out.println("Flow " + i);
			System.out.println("Xi:");
			int xi=Integer.parseInt(br.readLine());
			System.out.println("Yi:");
			int yi=Integer.parseInt(br.readLine());
			System.out.println("Xf:");
			int xf=Integer.parseInt(br.readLine());
			System.out.println("Yf:");
			int yf=Integer.parseInt(br.readLine());
			novoMapa.addPoints(yi, xi, yf, xf);
		}
		for(int i=0;i<num;i++)
		{
			for(int j=0;j<num;j++)
			{
				System.out.print(novoMapa.getMat()[i][j]);
				if(novoMapa.getMat()[i][j]<10)
					System.out.print(" ");
				System.out.print(" ");
			}
			System.out.println();
		}
		System.out.println("Nome do mapa:");
		String name=br.readLine();
		novoMapa.saveInFile(name);
	}

}
